

<!-- 一、节点配置界面的html代码 -->
<script type="text/html" data-template-name="Single Node">
    <!-- 设置第一行为Name 其中placeholder标识占位符 -->
    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="lora.single_nodeInfo.name"></span></label>
        <input type="text" id="node-input-name" data-i18n="[placeholder]lora.single_nodeInfo.name">
    </div>

    <!-- 指定节点设备 -->
    <div class="form-row">
        <label style="width: 150px;"><i class="icon-tag"></i> <span data-i18n="lora.single_nodeInfo.label_1"></span> </label>
    </div>

    <div class="form-row">
        <label for="node-input-devEUI"><i class="fa fa-tag"></i> devEUI </label>
        <input type="text" id="node-input-devEUI" placeholder="devEUI">
    </div>
</script>



<!-- 二、节点的配置信息 -->
<script type="text/javascript">
    RED.nodes.registerType('Single Node',{  
        category: 'LoRaWAN',
        color: '#ff9047',
        // 存放节点的可编辑属性
        defaults: {
            name: { value: "" }, // 对应于节点名称的配置
            devEUI: { value: "", required: true, validate: RED.validators.regex(/^[A-Za-z0-9]{16}$/) }
        },
        inputs:0,
        outputs:1,  
        icon: "bridge.svg",
        align: "left",
        
        label: function() {
            return this.name||this._("lora.single_nodeInfo.Label_0_dragOut");
        },


    });
</script>







    